#pragma once
#include "DeviceUserBase.h"
#include <vector>
#include "Common.h"


namespace Display
{
	class RenderUnit;

	class EXPORT RenderPack : public DeviceUserBase
	{
		std::vector<RenderUnit*> units;
		std::vector<RenderUnit*>::iterator it;

		
		RenderPack(void);
		~RenderPack(void);

		friend class ResourceFactory;

		static RenderPack * Create(ID3D11Device * device);
		static void Destroy(RenderPack * pack);

	public:

		 RenderUnit * CreateRenderUnit();
		 void DeleteRenderUnit(RenderUnit * unit);

		 RenderUnit * GetRenderUnit(int index);
		 int GetRenderUnitsCount();

	};

}